<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://47.106.66.89:8080/js/axios.min.js"></script>
</head>
<body>
  <h1>Hello</h1>
    <form action="consume" method="post" enctype="application/x-www-form-urlencoded">
        <button>提交表单请求</button>
    </form>
    <form action="consume" method="post" enctype="multipart/form-data"><button>提交文件上传请求</button></form>

  <form action="person" method="post" enctype="application/x-www-form-urlencoded">
      <input name="name"><br>
      <input name="age" type="number"><br>
      篮球:<input name="like" type="checkbox" value="篮球"><br>
      手游:<input name="like" type="checkbox" value="手游"><br>
      街舞:<input name="like" type="checkbox" value="街舞"><br>
      <input name="father.name"><br>
      <input name="father.age" type="number"><br>
      <input name="mather.name"><br>
      <input name="mather.age" type="number"><br>
      <button>自动装箱</button>
  </form>

  <form action="http://localhost/String_Mvc_war_exploded/body2" method="post" enctype="application/x-www-form-urlencoded">
      <input name="name"><br>
      <input name="age" type="number"><br>
      篮球:<input name="like" type="checkbox" value="篮球"><br>
      手游:<input name="like" type="checkbox" value="手游"><br>
      街舞:<input name="like" type="checkbox" value="街舞"><br>
      <input name="father.name"><br>
      <input name="father.age" type="number"><br>
      <input name="mather.name"><br>
      <input name="mather.age" type="number"><br>
      <button>自动装箱2</button>
  </form>

  <form action="body" method="post" enctype="application/x-www-form-urlencoded">
      <input name="name"><br>
      <input name="age" type="number"><br>
      篮球:<input name="like" type="checkbox" value="篮球"><br>
      手游:<input name="like" type="checkbox" value="手游"><br>
      街舞:<input name="like" type="checkbox" value="街舞"><br>
      <input name="father.name"><br>
      <input name="father.age" type="number"><br>
      <input name="mather.name"><br>
      <input name="mather.age" type="number"><br>
      <button>自动装箱</button>
  </form>
  <button onclick="a()" >axios 发送json</button>
  <button onclick="a2()" >axios 发送json</button>
<script>
   function a(){
       axios.post(
           "body",{
               name:"张三",
               age:10,
               like:["篮球","手游"],
               father:{
                   name:"李四",
                   age:40,
                   like:["篮球","手游"]
               }
           }
       ).then(resp=>{
           console.log(resp.data)
       });
   }
   function a2(){
       axios.post(
           "body2",{
               name:"张三",
               age:10,
               like:["篮球","手游"],
               father:{
                   name:"李四",
                   age:40,
                   like:["篮球","手游"]
               }
           }
       ).then(resp=>{
           console.log(resp.data)
       });
   }
</script>
</body>
</html>